<title>
	DouPHP 管理中心 - 编辑文章 
</title>

<script type="text/javascript" src="<?php echo __PUBLIC__?>Admin/js/jquery.autotextarea.js"></script>

<div id="dcMain">
	<!-- 当前位置 -->
	<div id="urHere">DouPHP 管理中心<b>></b><strong>编辑文章</strong> </div>
	<div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
		<h3><a href="index.php?m=admin&c=article&a=index" class="actionBtn">文章列表</a>编辑文章</h3>
		<form action="index.php?m=admin&c=article&a=edit" method="post" enctype="multipart/form-data">
			<table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
				<tr>
					<td width="90" align="right">文章名称</td>
					<td>
						<input type="text" name="title" value="<?php echo $this->article['img_name'];?>" size="80" class="inpMain" />
					</td>
				</tr>
				<tr>
					<td align="right">文章分类</td>
					<td>
						<select name="cat_id">
							<?php foreach($this->cat as $val):?>
							<?php if($val['id'] == $this->article['article_class']){?>
							<option value="<?php echo $val['id']?>" selected="selected">
								<?php echo $val['name'];?>
							</option>
							<?php }else{?>
							<option value="<?php echo $val['id']?>">
								<?php echo $val['name'];?>
							</option>
							<?php }?>
							<?php endForeach;?>

						</select>
					</td>
				</tr>
				<tr>
					<td align="right" valign="top">文章描述</td>
					<td>
						<link rel="stylesheet" href="<?php echo __PUBLIC__?>Admin/js/kindeditor/themes/default/default.css" />
						<link rel="stylesheet" href="<?php echo __PUBLIC__?>Admin/js/kindeditor/plugins/code/prettify.css" />
						<script charset="utf-8" src="<?php echo __PUBLIC__?>Admin/js/kindeditor/kindeditor.js"></script>
						<script charset="utf-8" src="<?php echo __PUBLIC__?>Admin/js/kindeditor/lang/zh_CN.js"></script>
						<script charset="utf-8" src="<?php echo __PUBLIC__?>Admin/js/kindeditor/plugins/code/prettify.js"></script>
						<script>
							KindEditor.ready(function(K) {
								var editor1 = K.create('textarea[name="content"]', {
									cssPath: '<?php echo __PUBLIC__?>Admin/js/kindeditor/plugins/code/prettify.css',
									uploadJson: '<?php echo __PUBLIC__?>Admin/js/kindeditor/php/upload_json.php',
									fileManagerJson: '<?php echo __PUBLIC__?>Admin/js/kindeditor/php/file_manager_json.php',
									allowFileManager: true,
									afterCreate: function() {
										var self = this;
										K.ctrl(document, 13, function() {
											self.sync();
											K('form[name=example]')[0].submit();
										});
										K.ctrl(self.edit.doc, 13, function() {
											self.sync();
											K('form[name=example]')[0].submit();
										});
									}
								});
								prettyPrint();
							});
						</script>
						<textarea id="content" name="content" style="width:780px;height:400px;" class="textArea"><?php echo $this->article['article'];?></textarea>
					</td>
				</tr>
				<tr>
					<td align="right">文章图片</td>
					<td>
						<input type="file" name="image" size="38" class="inpFlie" />
						<?php if(!empty($this->article['img_src'])){?>
						<img src="<?php echo $this->article['img_src'];?>" style="width: 50px;height: 50px;vertical-align: middle;">
						<?php }?>
					</td>
				</tr>
				<tr>
					<td></td>
					<td>
						<input type="hidden" name="id" value="<?php echo $this->article['id'];?>">
						<input name="submit" class="btn" type="submit" value="提交" />
					</td>
				</tr>
			</table>
		</form>
	</div>
</div>